/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hibernate.dao;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import util.HibernateUtil;

/**
 *
 * @author NDH
 */
public class AbstractDAO {

    public Query query;
    public Session session = getSession();

    public Session getSession() {
        return HibernateUtil.getSessionFactory().openSession();
    }
    Transaction tx;

    public AbstractDAO() {
        try {
//           session  = null;
//           session = HibernateUtil.getSessionFactory().openSession();
        } catch (Exception e) {
            ;
        }
    }

    public static void main(String[] args) {
    }
}
